package com.kira.scaffoldmvc.DataSource;

import com.kira.scaffoldmvc.POJO.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试多数据源事务
 */
@RestController
@RequestMapping("/dataSourceTest")
public class DataSourceTestController {

    @Resource
    DataSourceTestService dataSourceTestService;

    @GetMapping("/test1")
    Result test1() {
        return dataSourceTestService.testDataSource1();
    }

    @GetMapping("test2")
    Result test2(){
        return dataSourceTestService.testDataSource2();
    }

}
